//
//  MainTabBarController.swift
//  sxwb
//
//  Created by TianDu on 2016/11/11.
//  Copyright © 2016年 TianDu. All rights reserved.
//

import UIKit

class MainTabBarController: UITabBarController {
    
    let composeBtn = UIButton(image: "tabbar_compose_icon_add", bgImage: "tabbar_compose_button")
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        
        addPublicBtn()
    }
    
    fileprivate func addPublicBtn() {
    
        tabBar.addSubview(composeBtn)
        composeBtn.center = CGPoint(x: tabBar.center.x, y: tabBar.bounds.size.height/2)
        composeBtn.addTarget(self, action:#selector(composeBlog), for: .touchUpInside)
    }
    
    @objc fileprivate func composeBlog(){
        
        print("写微博!")
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
}
